import request from "@/utils/request";

//组织树 只加载一级
export const tree = () => {
  return request({
    url: "/ad/organization/tree",
    method: "get"
  });
};

// 当前cn的子组织
export const subList = query => {
  return request({
    url: "/ad/organization/sublist",
    method: "get",
    params: query
  });
};

// 当前cn的子组织 分页
export const subPageList = query => {
  return request({
    url: "/ad/organization/subPageList",
    method: "get",
    params: query
  });
};
// 导出
export const exportExcel = query => {
  return request({
    url: "/ad/organization/exportExcel",
    method: "post",
    params: query,
    responseType:'blob'
  });
};
export default {
  tree,
  subList,
  subPageList,
  exportExcel
};
